package base.factory.idcard;

import base.factory.framework.Factory;
import base.factory.framework.Product;

import java.util.Vector;

/**
 * @program: DesignPatterns
 * @description: 生产身份证具体的类
 * @author: Mr.Dai
 * @create: 2018-05-07 16:00
 **/
public class IdCardFactory extends Factory {

    private Vector idcards=new Vector<String>();

    @Override
    public Product createProduct(String name) {
        return new IdCard(name);
    }

    @Override
    public void registerProduct(Product product) {
            idcards.add(((IdCard)product).getOwer());
    }

    public Vector<String> getIdCards(){
        return idcards;
    }
}
